package com.summer.service.Impl;

import com.summer.dao.OrderDao;
import com.summer.pojo.Order;
import com.summer.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {
    @Autowired
    private OrderDao orderDao;

    @Override
    public int addOrder(Order order) {
        orderDao.addOrder(order);
        return 0;
    }

    @Override
    public List<Order> selectOrderByUid(int uid) {
        List<Order> orders = orderDao.selectOrderByUid(uid);
        return orders;
    }
}
